package com.goods.common.enums.system;

/**
 * Created with IntelliJ IDEA
 *
 * @Date: 2023/3/8 - 11:12
 * @Author: Hyoung
 * @Description:
 */
public enum CategoryIDEnum {
    ONECATEGORYID(1, "oneCategoryId"),
    TWOCATEGORYID(2, "twoCategoryId"),
    THREECATEGORYID(3, "threeCategoryId"),
    ;

    Integer id;
    String category;

    CategoryIDEnum(Integer id, String category) {
        this.id = id;
        this.category = category;
    }

    public static String getCategory(Integer id) {
        CategoryIDEnum[] values = CategoryIDEnum.values();
        for (CategoryIDEnum value : values) {
            if (value.getId().equals(id)) {
                return value.getCategory();
            }
        }
        return null;
    }

    public Integer getId() {
        return id;
    }

    public String getCategory() {
        return category;
    }
}
